int main()
{
// XY平面
techlego::pos6d plane{};
plane.m_x = 0;
plane.m_y = 0;
plane.m_z = 0;
plane.m_nx = 0;
plane.m_ny = 0;
plane.m_nz = 1;
// 过点(3,3,5)方向为(0,0,1)的一条直线
techlego::pos6d line{};
line.m_x = 3;
line.m_y = 3;
line.m_z = 5;
line.m_nx = 0;
line.m_ny = 0;
line.m_nz = 1;
techlego::pos3d point;
// 检测线与面是否相交
if (plane.plane_line_intersect(line, point))
{
std::cout << "there is a intersection point:" << point.m_x << " " << point.m_y << " " << point.m_z << "\n";
}
else
{
std::cout << "there is no intersection point between the line and the plane\n";
}
return 0;
}